# 9x07 SecureBoot 未验证成功

FROM ubuntu:16.04
RUN  apt-get update
RUN  apt-get upgrade --assume-yes
RUN  apt-get install --assume-yes build-essential sed gawk  g++ g++-multilib wget  sudo  python \
     mtd-utils  squashfs-tools libxml2-utils cryptsetup-bin python-crcmod liblzo2-dev  \
     libssl-dev  unzip \
     python-pip \
     python-crcmod rsync fakeroot openssl apt-utils squashfs-tools  \
     tree zip dos2unix  locales
     

ARG user=test

RUN useradd --create-home --no-log-init --shell /bin/bash ${user} \
    && adduser ${user} sudo \
    && echo "${user}:1" | chpasswd

RUN update-alternatives --install /usr/bin/python  python /usr/bin/python2  2700

RUN pip install python-lzo==1.11


# RUN locale-gen C.UTF-8
# USER builder

USER  ${user}

#RUN locale-gen en_US.UTF-8
#RUN export LANG=en_US.UTF-8

ENV LANG=C.UTF-8
ENV LC_ALL=C.UTF-8

#  cp libbz2.so.0* /usr/lib/

RUN echo "export LANG=C.UTF-8" >> /home/${user}/.profile
RUN echo "export  LC_ALL=C.UTF-8" >> /home/${user}/.profile

# docker run -it -v `pwd`:/home/test/dfota  -e PYTHONIOENCODING=utf-8  --privileged  9x07-ubuntu16 /bin/bash
